import request from '@/utils/request'

// 查询消息源列表
export function listMessageSource(query) {
  return request({
    url: '/coal/messageSource/list',
    method: 'get',
    params: query
  })
}

// 查询消息源详细
export function getMessageSource(id) {
  return request({
    url: '/coal/messageSource/' + id,
    method: 'get'
  })
}

// 新增消息源
export function addMessageSource(data) {
  return request({
    url: '/coal/messageSource',
    method: 'post',
    data: data
  })
}

// 修改消息源
export function updateMessageSource(data) {
  return request({
    url: '/coal/messageSource',
    method: 'put',
    data: data
  })
}

// 删除消息源
export function delMessageSource(id) {
  return request({
    url: '/coal/messageSource/' + id,
    method: 'delete'
  })
}
